package cn.spike.rockcc.web.controller;

import cn.spike.rockcc.result.JSONResult;
import cn.spike.rockcc.service.IQRService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:spike
 * @create:2023-03-19 14:29
 */
@RestController
@RequestMapping("/QR")
public class QRController {

    @Autowired
    private IQRService qrService;

    @GetMapping("/QRCode/{code}")
    public JSONResult getQRCode(@PathVariable("code")String code){
        return JSONResult.success(qrService.getQRCode());

    }
}
